package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"product-payment/api/internal/config"
	"product-payment/prorpc/prorpcclient"
)

type ServiceContext struct {
	Config config.Config
	ProRpc prorpcclient.Prorpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		ProRpc: prorpcclient.NewProrpc(zrpc.MustNewClient(c.ProRpc)),
	}
}
